package com.ymatou.iapi.accounting.testcase;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Set;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.accounting.parameter.*;
import com.ymatou.iapi.accounting.service.*;
import com.ymatou.iapi.userregister.parameter.UserRegisterInfoRequestDtoBean;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.business.service.AccountCallServiceV2;
import com.ymttest.business.service.JUserCallService;
import com.ymttest.database.sqlwapper.AccountWapper;
import com.ymttest.utils.TestDataManager;
import com.ymttest.utils.YMTDateUtil;
/**
*批量查询用户流水
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_GetUserAccountEntryList {
	private static GetUserAccountEntryListBean getuseraccountentrylistBean;
	private static GetUserAccountEntryListCall getuseraccountentrylistCall;
	private static  AccountWapper accountwapper;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("批量查询用户流水");
	}

	@Before
	public void caseUp() {
		getuseraccountentrylistBean = new GetUserAccountEntryListBean();
		getuseraccountentrylistCall = new GetUserAccountEntryListCall();
		accountwapper=new AccountWapper();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(getuseraccountentrylistCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_GetUserAccountEntryList_001() {
		Logger.start(true, "批量查询单个用户流水成功");
		try {
			Set set=new HashSet<>();
			Integer type = 1;
			UserRegisterInfoRequestDtoBean urb = JUserCallService.initUserRegisterInfoRequestDtoBean();
			Integer uid = JUserCallService.UserRegisterInfoRequestDtoCall(urb).getUserid();
			String aid = AccountCallServiceV2.getAccountId(uid, type);
			Integer newAmount = new Random().nextInt(10) + 1;
			Integer newFreeze = new Random().nextInt(10) + 1;

			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));
			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));

			String accountingType = type.toString();
			getuseraccountentrylistBean.setAccountingType(accountingType);
			List<Integer> AccountTypeList = new ArrayList<Integer>();
			AccountTypeList.add(1);
			getuseraccountentrylistBean.setAccountTypeList(AccountTypeList);
			getuseraccountentrylistBean.setAppId("autotest");
			getuseraccountentrylistBean.setUserId(uid);
			getuseraccountentrylistBean.setPageIndex(1);
			getuseraccountentrylistBean.setPageSize(10);
			getuseraccountentrylistCall.setData(getuseraccountentrylistBean);
			getuseraccountentrylistCall.callService();
			Logger.verifyEquals("0", getuseraccountentrylistCall.getString("StatusCode"), "验证StatusCode");
			Logger.verifyEquals("操作成功！", getuseraccountentrylistCall.getString("Message"), "验证Message");

			VerifyDb(uid, accountingType, AccountTypeList,null,null,set);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P3.class })
	@TestCase
	public void Tc_GetUserAccountEntryList_002() {
		Logger.start(true, "不输入AccountTypeList失败");
		try {
			int type = 1;
			UserRegisterInfoRequestDtoBean urb = JUserCallService.initUserRegisterInfoRequestDtoBean();
			Integer uid = JUserCallService.UserRegisterInfoRequestDtoCall(urb).getUserid();
			String aid = AccountCallServiceV2.getAccountId(uid, type);
			Integer newAmount = new Random().nextInt(10) + 1;
			Integer newFreeze = new Random().nextInt(10) + 1;

			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));
			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));

			int accountType = 1;
			String bizcode = "100001";
			getuseraccountentrylistBean.setAccountingType(bizcode);
			// List<Integer> AccountTypeList = new ArrayList<Integer>();
			// AccountTypeList.add(accountType);
			// getuseraccountentrylistBean.setAccountTypeList(AccountTypeList);
			getuseraccountentrylistBean.setAppId("autotest");
			getuseraccountentrylistBean.setUserId(uid);
			getuseraccountentrylistBean.setPageIndex(1);
			getuseraccountentrylistBean.setPageSize(10);
			getuseraccountentrylistCall.setData(getuseraccountentrylistBean);
			getuseraccountentrylistCall.callService();
			Logger.verifyEquals("2", getuseraccountentrylistCall.getString("StatusCode"), "验证StatusCode");
			Logger.verifyIsContains("AccountTypeList不能为空", getuseraccountentrylistCall.getString("Message"), "验证Message");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P3.class })
	@TestCase
	public void Tc_GetUserAccountEntryList_003() {
		Logger.start(true, "不输入UserId失败");
		try {
			int type = 1;
			UserRegisterInfoRequestDtoBean urb = JUserCallService.initUserRegisterInfoRequestDtoBean();
			Integer uid = JUserCallService.UserRegisterInfoRequestDtoCall(urb).getUserid();
			String aid = AccountCallServiceV2.getAccountId(uid, type);
			Integer newAmount = new Random().nextInt(10) + 1;
			Integer newFreeze = new Random().nextInt(10) + 1;

			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));
			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));

			int accountType = 1;
			String bizcode = "100001";
			getuseraccountentrylistBean.setAccountingType(bizcode);
			List<Integer> AccountTypeList = new ArrayList<Integer>();
			AccountTypeList.add(accountType);
			getuseraccountentrylistBean.setAccountTypeList(AccountTypeList);
			getuseraccountentrylistBean.setAppId("autotest");
			// getuseraccountentrylistBean.setUserId(uid);
			getuseraccountentrylistBean.setPageIndex(1);
			getuseraccountentrylistBean.setPageSize(10);
			getuseraccountentrylistCall.setData(getuseraccountentrylistBean);
			getuseraccountentrylistCall.callService();
			Logger.verifyEquals("2", getuseraccountentrylistCall.getString("StatusCode"), "验证StatusCode");
			Logger.verifyIsContains("UserId不能为空", getuseraccountentrylistCall.getString("Message"), "验证Message");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P2.class })
	@TestCase
	public void Tc_GetUserAccountEntryList_004() {
		Logger.start(true, "输入多个AccountTypeList查询单用户多个账户流水成功");
		try {
			Integer type = 1;
			UserRegisterInfoRequestDtoBean urb = JUserCallService.initUserRegisterInfoRequestDtoBean();
			Integer uid = JUserCallService.UserRegisterInfoRequestDtoCall(urb).getUserid();
			String aid = AccountCallServiceV2.getAccountId(uid, type);
			Integer newAmount = new Random().nextInt(10) + 1;
			Integer newFreeze = new Random().nextInt(10) + 1;

			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));
			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));

			String accountingType = type.toString();
			getuseraccountentrylistBean.setAccountingType(accountingType);
			List<Integer> AccountTypeList = new ArrayList<Integer>();
			AccountTypeList.add(1);
			AccountTypeList.add(-1);
			getuseraccountentrylistBean.setAccountTypeList(AccountTypeList);
			getuseraccountentrylistBean.setAppId("autotest");
			getuseraccountentrylistBean.setUserId(uid);
			getuseraccountentrylistBean.setPageIndex(1);
			getuseraccountentrylistBean.setPageSize(10);
			getuseraccountentrylistCall.setData(getuseraccountentrylistBean);
			getuseraccountentrylistCall.callService();
			Logger.verifyEquals("0", getuseraccountentrylistCall.getString("StatusCode"), "验证StatusCode");
			Logger.verifyEquals("操作成功！", getuseraccountentrylistCall.getString("Message"), "验证Message");
			Set set=new HashSet<>();
			VerifyDb(uid, accountingType, AccountTypeList,null,null,set);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P2.class })
	@TestCase
	public void Tc_GetUserAccountEntryList_005() {
		Logger.start(true, "根据AccountingType过滤搜索条件成功");
		try {
			Integer type = 4;
			UserRegisterInfoRequestDtoBean urb = JUserCallService.initUserRegisterInfoRequestDtoBean();
			Integer uid = JUserCallService.UserRegisterInfoRequestDtoCall(urb).getUserid();
			String aid = AccountCallServiceV2.getAccountId(uid, type);
			Integer newAmount = new Random().nextInt(10) + 1;
			Integer newFreeze = new Random().nextInt(10) + 1;

			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));
			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));

			String accountingType = "-1";
			getuseraccountentrylistBean.setAccountingType(accountingType);
			List<Integer> AccountTypeList = new ArrayList<Integer>();
			AccountTypeList.add(type);
			getuseraccountentrylistBean.setAccountTypeList(AccountTypeList);
			getuseraccountentrylistBean.setAppId("autotest");
			getuseraccountentrylistBean.setUserId(uid);
			getuseraccountentrylistBean.setPageIndex(1);
			getuseraccountentrylistBean.setPageSize(10);
			getuseraccountentrylistCall.setData(getuseraccountentrylistBean);
			getuseraccountentrylistCall.callService();
			Logger.verifyEquals("0", getuseraccountentrylistCall.getString("StatusCode"), "验证StatusCode");
			Logger.verifyEquals("操作成功！", getuseraccountentrylistCall.getString("Message"), "验证Message");
			Set set=new HashSet<>();
			VerifyDb(uid, accountingType, AccountTypeList,null,null,set);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P2.class })
	@TestCase
	public void Tc_GetUserAccountEntryList_006() {
		Logger.start(true, "流水时间在BeginTime和EndTime中间查询到流水记录");
		try {
			Integer type = 1;
			UserRegisterInfoRequestDtoBean urb = JUserCallService.initUserRegisterInfoRequestDtoBean();
			Integer uid = JUserCallService.UserRegisterInfoRequestDtoCall(urb).getUserid();
			String aid = AccountCallServiceV2.getAccountId(uid, type);
			Integer newAmount = new Random().nextInt(10) + 1;
			Integer newFreeze = new Random().nextInt(10) + 1;

			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));
			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));

			String accountingType = type.toString();
			getuseraccountentrylistBean.setAccountingType(accountingType);
			List<Integer> AccountTypeList = new ArrayList<Integer>();
			AccountTypeList.add(1);
			AccountTypeList.add(-1);
			getuseraccountentrylistBean.setAccountTypeList(AccountTypeList);
			getuseraccountentrylistBean.setAppId("autotest");
			getuseraccountentrylistBean.setUserId(uid);
			getuseraccountentrylistBean.setPageIndex(1);
			getuseraccountentrylistBean.setPageSize(10);
			getuseraccountentrylistBean.setBeginTime(YMTDateUtil.getBeforeOrNextMunite(-3));
			getuseraccountentrylistBean.setEndTime(YMTDateUtil.getBeforeOrNextMunite(3));
			getuseraccountentrylistCall.setData(getuseraccountentrylistBean);
			getuseraccountentrylistCall.callService();
			Logger.verifyEquals("0", getuseraccountentrylistCall.getString("StatusCode"), "验证StatusCode");
			Logger.verifyEquals("操作成功！", getuseraccountentrylistCall.getString("Message"), "验证Message");
			Set set=new HashSet<>();
			VerifyDb(uid, accountingType, AccountTypeList,null,null,set);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P2.class })
	@TestCase
	public void Tc_GetUserAccountEntryList_007() {
		Logger.start(true, "流水时间在BeginTime和EndTime之前未查询到流水记录");
		try {
			Integer type = 1;
			UserRegisterInfoRequestDtoBean urb = JUserCallService.initUserRegisterInfoRequestDtoBean();
			Integer uid = JUserCallService.UserRegisterInfoRequestDtoCall(urb).getUserid();
			String aid = AccountCallServiceV2.getAccountId(uid, type);
			Integer newAmount = new Random().nextInt(10) + 1;
			Integer newFreeze = new Random().nextInt(10) + 1;

			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));
			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));

			String accountingType = type.toString();
			getuseraccountentrylistBean.setAccountingType(accountingType);
			List<Integer> AccountTypeList = new ArrayList<Integer>();
			AccountTypeList.add(1);
			AccountTypeList.add(-1);
			getuseraccountentrylistBean.setAccountTypeList(AccountTypeList);
			getuseraccountentrylistBean.setAppId("autotest");
			getuseraccountentrylistBean.setUserId(uid);
			getuseraccountentrylistBean.setPageIndex(1);
			getuseraccountentrylistBean.setPageSize(10);
			getuseraccountentrylistBean.setBeginTime(YMTDateUtil.getBeforeOrNextMunite(-10));
			getuseraccountentrylistBean.setEndTime(YMTDateUtil.getBeforeOrNextMunite(-5));
			getuseraccountentrylistCall.setData(getuseraccountentrylistBean);
			getuseraccountentrylistCall.callService();
			Logger.verifyEquals("0", getuseraccountentrylistCall.getString("StatusCode"), "验证StatusCode");
			Logger.verifyEquals("操作成功！", getuseraccountentrylistCall.getString("Message"), "验证Message");
			Logger.verifyEquals(0, getuseraccountentrylistCall.getAccountEntryListData().getTotalRecords(), "验证TotalRecords");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P2.class })
	@TestCase
	public void Tc_GetUserAccountEntryList_008() {
		Logger.start(true, "流水时间在BeginTime和EndTime之后未查询到流水记录");
		try {
			Integer type = 1;
			UserRegisterInfoRequestDtoBean urb = JUserCallService.initUserRegisterInfoRequestDtoBean();
			Integer uid = JUserCallService.UserRegisterInfoRequestDtoCall(urb).getUserid();
			String aid = AccountCallServiceV2.getAccountId(uid, type);
			Integer newAmount = new Random().nextInt(10) + 1;
			Integer newFreeze = new Random().nextInt(10) + 1;

			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));
			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));

			String accountingType = type.toString();
			getuseraccountentrylistBean.setAccountingType(accountingType);
			List<Integer> AccountTypeList = new ArrayList<Integer>();
			AccountTypeList.add(1);
			AccountTypeList.add(-1);
			getuseraccountentrylistBean.setAccountTypeList(AccountTypeList);
			getuseraccountentrylistBean.setAppId("autotest");
			getuseraccountentrylistBean.setUserId(uid);
			getuseraccountentrylistBean.setPageIndex(1);
			getuseraccountentrylistBean.setPageSize(10);
			getuseraccountentrylistBean.setBeginTime(YMTDateUtil.getBeforeOrNextMunite(10));
			getuseraccountentrylistBean.setEndTime(YMTDateUtil.getBeforeOrNextMunite(20));
			getuseraccountentrylistCall.setData(getuseraccountentrylistBean);
			getuseraccountentrylistCall.callService();
			Logger.verifyEquals("0", getuseraccountentrylistCall.getString("StatusCode"), "验证StatusCode");
			Logger.verifyEquals("操作成功！", getuseraccountentrylistCall.getString("Message"), "验证Message");
			Logger.verifyEquals(0, getuseraccountentrylistCall.getAccountEntryListData().getTotalRecords(), "验证TotalRecords");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P2.class })
	@TestCase
	public void Tc_GetUserAccountEntryList_009() {
		Logger.start(true, "设置分页查询出分页信息成功");
		try {
			Set set=new HashSet<>();
			Integer type = 1;
			UserRegisterInfoRequestDtoBean urb = JUserCallService.initUserRegisterInfoRequestDtoBean();
			Integer uid = JUserCallService.UserRegisterInfoRequestDtoCall(urb).getUserid();
			String aid = AccountCallServiceV2.getAccountId(uid, type);
			Integer newAmount = new Random().nextInt(10) + 1;
			Integer newFreeze = new Random().nextInt(10) + 1;

			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));
			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));

			String accountingType = type.toString();
			getuseraccountentrylistBean.setAccountingType(accountingType);
			List<Integer> AccountTypeList = new ArrayList<Integer>();
			AccountTypeList.add(1);
			getuseraccountentrylistBean.setAccountTypeList(AccountTypeList);
			getuseraccountentrylistBean.setAppId("autotest");
			getuseraccountentrylistBean.setUserId(uid);
			getuseraccountentrylistBean.setPageIndex(1);
			getuseraccountentrylistBean.setPageSize(2);
			getuseraccountentrylistCall.setData(getuseraccountentrylistBean);
			getuseraccountentrylistCall.callService();
			Logger.verifyEquals("0", getuseraccountentrylistCall.getString("StatusCode"), "验证StatusCode");
			Logger.verifyEquals("操作成功！", getuseraccountentrylistCall.getString("Message"), "验证Message");
			set=VerifyDb(uid, accountingType, AccountTypeList,null,null,set);
			
			getuseraccountentrylistBean.setPageIndex(2);
			getuseraccountentrylistCall.callService();
			Logger.verifyEquals("0", getuseraccountentrylistCall.getString("StatusCode"), "验证StatusCode");
			Logger.verifyEquals("操作成功！", getuseraccountentrylistCall.getString("Message"), "验证Message");
			set=VerifyDb(uid, accountingType, AccountTypeList,null,null,set);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P2.class })
	@TestCase
	public void Tc_GetUserAccountEntryList_010() {
		Logger.start(true, "根据BizCode过滤搜索条件成功");
		try {
			Integer type = 1;
			UserRegisterInfoRequestDtoBean urb = JUserCallService.initUserRegisterInfoRequestDtoBean();
			Integer uid = JUserCallService.UserRegisterInfoRequestDtoCall(urb).getUserid();
			String aid = AccountCallServiceV2.getAccountId(uid, type);
			Integer newAmount = new Random().nextInt(10) + 1;
			Integer newFreeze = new Random().nextInt(10) + 1;
			int bizcode=100006;
			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));
			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));
			String ono=TestDataManager.getRandomUUID().toString();
			 AccountingItemBean accountingitemBean = AccountCallServiceV2.getFundinBean(aid,new BigDecimal( "2"), bizcode, ono);
			AccountingBean accountingBean=new AccountingBean();
			List<AccountingItemBean> AccountingItems=new ArrayList<>();
			AccountingItems.add(accountingitemBean);
			accountingBean.setAccountingItems(AccountingItems);
			accountingBean.setAppId("test");
			AccountCallServiceV2.Accounting(accountingBean);
			String accountingType = type.toString();
			getuseraccountentrylistBean.setAccountingType(accountingType);
			List<Integer> AccountTypeList = new ArrayList<Integer>();
			AccountTypeList.add(1);
			getuseraccountentrylistBean.setAccountTypeList(AccountTypeList);
			getuseraccountentrylistBean.setAppId("autotest");
			getuseraccountentrylistBean.setUserId(uid);
			getuseraccountentrylistBean.setPageIndex(1);
			getuseraccountentrylistBean.setPageSize(10);
			getuseraccountentrylistBean.setBizCode(bizcode);
			getuseraccountentrylistCall.setData(getuseraccountentrylistBean);
			getuseraccountentrylistCall.callService();
			Logger.verifyEquals("0", getuseraccountentrylistCall.getString("StatusCode"), "验证StatusCode");
			Logger.verifyEquals("操作成功！", getuseraccountentrylistCall.getString("Message"), "验证Message");
			Set set=new HashSet<>();
			VerifyDb(uid, accountingType, AccountTypeList,bizcode,null,set);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({ P2.class })
	@TestCase
	public void Tc_GetUserAccountEntryList_011() {
		Logger.start(true, "根据EntryType过滤搜索条件成功");
		try {
			Integer type = 1;
			UserRegisterInfoRequestDtoBean urb = JUserCallService.initUserRegisterInfoRequestDtoBean();
			Integer uid = JUserCallService.UserRegisterInfoRequestDtoCall(urb).getUserid();
			String aid = AccountCallServiceV2.getAccountId(uid, type);
			Integer newAmount = new Random().nextInt(10) + 1;
			Integer newFreeze = new Random().nextInt(10) + 1;

			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));
			AccountCallServiceV2.resetAccount(aid, new BigDecimal(newAmount), new BigDecimal(newFreeze));

			String accountingType = type.toString();
			getuseraccountentrylistBean.setAccountingType(accountingType);
			List<Integer> AccountTypeList = new ArrayList<Integer>();
			AccountTypeList.add(1);
			getuseraccountentrylistBean.setAccountTypeList(AccountTypeList);
			getuseraccountentrylistBean.setAppId("autotest");
			getuseraccountentrylistBean.setUserId(uid);
			getuseraccountentrylistBean.setPageIndex(1);
			getuseraccountentrylistBean.setPageSize(10);
			getuseraccountentrylistBean.setEntryType(2);
			getuseraccountentrylistCall.setData(getuseraccountentrylistBean);
			getuseraccountentrylistCall.callService();
			Logger.verifyEquals("0", getuseraccountentrylistCall.getString("StatusCode"), "验证StatusCode");
			Logger.verifyEquals("操作成功！", getuseraccountentrylistCall.getString("Message"), "验证Message");
			Set set=new HashSet<>();
			VerifyDb(uid, accountingType, AccountTypeList,null,getuseraccountentrylistBean.getEntryType(),set);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	/**
	 * @param uid
	 *            用户id
	 * @param accountingType
	 *            1收入 -1支出 判断amount正负
	 * @param accountTypeList
	 *            账户类型 1人民币
	 * @param checkcount
	 * @return
	 * @throws InterruptedException
	 */
	@SuppressWarnings("unchecked")
	private Set VerifyDb(Integer uid, String accountingType, List<Integer> accountTypeList,Integer bizcode,Integer entryType,Set set) throws InterruptedException {
		List<AccountEntry> data = getuseraccountentrylistCall.getAccountEntryListData().getAccountEntryList();
		Map m = new HashMap<>();
		m.put("userId", uid);
		if (accountingType != null) {
			m.put("accountingType", Integer.valueOf(accountingType));
		}
		if (bizcode != null) {
			m.put("bizcode", bizcode);
		}
		if (entryType != null) {
			m.put("entryType",entryType);
		}
		m.put("accountTypeList", accountTypeList);
		List<com.ymttest.database.model.AccountEntry> dblist = accountwapper.selectAccountEntryByMap(m);
		Logger.verifyEquals(dblist.size(), getuseraccountentrylistCall.getAccountEntryListData().getTotalRecords(), "验证TotalRecords");
		for (int i = 0; i < data.size(); i++) {
			Logger.verifyEquals(false,set.contains(set.add(data.get(i).getEntryId())),"验证entryid不重复");
			set.add(data.get(i).getEntryId());
			m.put("entryid", data.get(i).getEntryId());
			com.ymttest.database.model.AccountEntry db = accountwapper.selectAccountEntryByMap(m).get(0);
			Logger.verifyEquals(db.getEntryId(), data.get(i).getEntryId(), "验证EntryId");
			Logger.verifyEquals(db.getAccountId(), data.get(i).getAccountId(), "验证AccountId");
			Logger.verifyEquals(db.getAmount().setScale(2), data.get(i).getAmount().setScale(2), "验证Amount");
			Logger.verifyEquals(db.getAvailAmount().setScale(2), data.get(i).getAvailAmount().setScale(2), "验证Availamount");
			Logger.verifyEquals(db.getFreezeAmount().setScale(2), data.get(i).getFreezeAmount().setScale(2), "验证Freezeamount");
			Logger.verifyEquals(db.getUserId(), data.get(i).getUserId(), "验证UserId");
			Logger.verifyEquals(db.getOriginalNo(), data.get(i).getOriginalNo(), "验证Originalno");
			Logger.verifyEquals(db.getBizNo(), data.get(i).getBizNo(), "验证Bizno");
			Logger.verifyEquals(db.getBizCode(), data.get(i).getBizCode(), "验证Bizcode");
			Logger.verifyEquals(db.getOperator(), data.get(i).getOperator(), "验证Operator");
			Logger.verifyEquals(db.getMemo(), data.get(i).getMemo(), "验证Memo");
		}
		return set;

	}
}